package com.arun.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 德合盛分容设备与海陆通MES系统对接协议
 * CREATE TABLE [dbo].[CUX_DHS_BatteryINFO](
 * 	[ID] [int] NOT NULL,
 * 	[BatCode] [nvarchar](50) NULL,
 * 	[WoNo] [smallint] NULL,
 * 	[WoName] [nvarchar](40) NULL,
 * 	[EndV] [nvarchar](40) NULL,
 * 	[EndI] [nvarchar](40) NULL,
 * 	[EndC] [nvarchar](40) NULL,
 * 	[AddTime] [nvarchar](40) NULL
 * )
 */
@NoArgsConstructor
@lombok.Data
public class Data implements Serializable {

    @JsonProperty("Data")
    private List<DataDTO> Data;

    @NoArgsConstructor
    @lombok.Data
    public static class DataDTO {
        /**
         * BatCode : Bat001
         * Details : [{"WoNo":"1","EndV":"4201.5","EndI":"0","EndC":"0","AddTime":"2021-02-24 18:55:00"},{"WoNo":"2","EndV":"4201.5","EndI":"20.5","EndC":"61.9","AddTime":"2021-02-24 19:55:00"},{"WoNo":"3","EndV":"4201.5","EndI":"20.5","EndC":"61.9","AddTime":"2021-02-24 20:55:00"}]
         */

        @JsonProperty("BatCode")
        private String BatCode; // 电芯条码
        @JsonProperty("Details")
        private List<DetailsDTO> Details;

        @NoArgsConstructor
        @lombok.Data
        public static class DetailsDTO {
            /**
             * WoNo : 1 // 工步号
             * WoName :  // 工步名称
             * EndV : 4201.5 // 终止电压
             * EndI : 0 // 终止电流
             * EndC : 0 // 终止容量
             * AddTime : 2021-02-24 18:55:00 // 采集时间
             */
            //@JsonIgnore
            //private int id;
            //@JsonIgnore
            //private String BatCode=DataDTO.this.BatCode;
            @JsonProperty("WoNo")
            private String WoNo;
            @JsonProperty("WoName")
            private String WoName;
            @JsonProperty("EndV")
            private String EndV;
            @JsonProperty("EndI")
            private String EndI;
            @JsonProperty("EndC")
            private String EndC;
            @JsonProperty("AddTime")
            private String AddTime;
        }
    }
}
